package dtos;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


public class ThreshresourceDTO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6894020912047243880L;
	private int id;
	private String name;
	private int value;
	private int idTicket;
	private List<Integer> techresources=new ArrayList<>();
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getValue() {
		return value;
	}
	public void setValue(int value) {
		this.value = value;
	}
	
	public int getIdTicket() {
		return idTicket;
	}
	public void setIdTicket(int idTicket) {
		this.idTicket = idTicket;
	}
	public List<Integer> getTechresources() {
		return techresources;
	}
	public void setTechresources(List<Integer> techresources) {
		this.techresources = techresources;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ThreshresourceDTO other = (ThreshresourceDTO) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
	public void addTechresource(int id) {
		techresources.add(id);
	}
}
